package com.itheima.udp5;

import java.io.IOException;
import java.net.*;
import java.util.Scanner;

public class FasongClient {

    public static void main(String[] args) throws IOException {
        //创建 发送对象
        DatagramSocket ds = new DatagramSocket();
        //创建数据对象
        while (true) {
            String s = new Scanner(System.in).nextLine();
            DatagramPacket dp = new DatagramPacket(s.getBytes(),s.getBytes().length, InetAddress.getByName("192.168.13.255"),8888);
            //发送
            ds.send(dp);
        }
        //释放资源



    }
}
